package com.example.product.statemachine;


public enum PDStates {

    STATE1("STATE1", "状态1"),
    STATE2("STATE2", "状态2"),
    STATE3("STATE3", "状态3"),
    STATE4("STATE4", "状态4");

    private String value;
    private String message;

    PDStates(String value, String message) {
        this.value = value;
        this.message = message;
    }

    public static PDStates getState(String value) {
        for (PDStates state : PDStates.values()) {
            if (state.getValue().equals(value)) {
                return state;
            }
        }
        return null;
    }

    public String getValue() {
        return value;
    }

    public void setValue(String value) {
        this.value = value;
    }

    public String getMessage() {
        return message;
    }

    public void setMessage(String message) {
        this.message = message;
    }
}
